<template>
  <div class="distribute-search">
    <a-input-search
      v-model:value="value"
      placeholder="请输入设备记录原因字符串"
      enter-button="搜索记录"
      size="large"
      @search="onSearch"
    />
  </div>
</template>

<script lang="ts">
import { defineComponent, ref } from "vue";

export default defineComponent({
  name: "DistributeSearch",
  emits: ["distributeSearch"],
  setup(__, context) {
    const value = ref<string>("");
    const onSearch = () => {
      context.emit("distributeSearch", {
        reason: value.value,
      });
    };
    return { value, onSearch };
  },
});
</script>

<style scoped lang="scss"></style>
